package com.app.designpatternslearn.creational.abstractfactorypattern

import com.app.designpatternslearn.creational.abstractfactorypattern.code.FactoryType
import com.app.designpatternslearn.creational.abstractfactorypattern.code.color.ColorType
import com.app.designpatternslearn.creational.abstractfactorypattern.code.getFactory
import com.app.designpatternslearn.creational.abstractfactorypattern.code.shape.ShapeType

fun main() {

    val shapeFactory = getFactory(FactoryType.SHAPE)

    val circle = shapeFactory.getShape(ShapeType.CIRCLE)
    circle.draw()

    val colorFactory = getFactory(FactoryType.COLOR)

    val red = colorFactory.getColor(ColorType.RED)

    red.fill()

}